n=int(input())
numbers=list(map(int,input().split()))
s={}

for number in numbers:
    if s.get(number) is None:
        s[number]=1
    else:
        s[number]+=1
    print(s[number],end=" ")